<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/include/tagLib.jsp" %>
<!doctype html>
<html lang="en">
<head>
    <title>${sieName}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <%@include file="/include/cssLib.jsp" %>
</head>

<body>
<div class="container-fluid">
    <div class="row">
        <div class="col-md-12">
            <!-- 菜单 -->
            <tag:nav key="sysAdmin"/>

            <div class="tab-content">
                <div class="tab-pane active">
                    <div class="card col-md-10 col-md-offset-1">
                        <tag:sys-nav key="sysDynamic"/>
                        <div class="card-header">
                            <div class="row">
                                <form id="searchForm" action="${ctx}/adminConsole/sysDynamic/pageList" method="post">
                                    <div class="col-md-2">
                                        <select name="QF__EQ__createBy" class="selectpicker" data-style="select-with-transition" data-live-search="true">
                                            <option value="">操作人</option>
                                            <c:forEach items="${fns:getUserSelectListData()}" var="selectBo">
                                                <option value="${selectBo.value}" ${selectBo.value eq searchCondMap['QF__EQ__createBy']?'selected':''}>${selectBo.text}</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                    <div class="col-md-2">
                                        <input type="text" name="QF__EQ__action" value="${searchCondMap['QF__EQ__action']}" class="form-control clearable" placeholder="动作"/>
                                    </div>
                                    <div class="col-md-2">
                                        <input type="text" id="rangeCreateDate" name="QF__BW__createTime" value="${searchCondMap['QF__BW__createTime']}" class="form-control" placeholder=" 范围时间"/>
                                    </div>
                                    <div class="col-md-1">
                                        <button type="submit" class="btn btn-twitter"><i class="fa fa-search"></i></button>
                                        <input type="hidden" id="pageNo" name="pageNo"/>
                                        <input type="hidden" id="pageSize" name="pageSize" />
                                        <input type="hidden" id="orderBy" name="page.orderBy" value="${orderBean.orderBy}"/>
                                        <input type="hidden" id="order" name="page.order" value="${orderBean.order}"/>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <div class="card-content">
                            <tag:paging-simple page="${pageResult}"/>
                            <div class="table-responsive">
                                <table class="table table-bordered table-hover">
                                    <thead>
                                    <tr>
                                        <th class="text-center">操作人</th>
                                        <th>动作</th>
                                        <th>主题</th>
                                        <th>说明</th>
                                        <th>IP</th>
                                        <th sort-field="create_time">操作时间</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <c:forEach items="${pageResult.result }" var="data">
                                        <tr>
                                            <td class="text-center">${data.createByName}</td>
                                            <td>${data.action}</td>
                                            <td>${data.subject}</td>
                                            <td>${data.desc}</td>
                                            <td>${data.ip}</td>
                                            <td>${fns:formatTimeAgo(data.createTime)}</td>
                                        </tr>
                                    </c:forEach>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <tag:paging page="${pageResult}"/>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<%@include file="/include/sidebarRight.jsp" %>
</body>
<%@include file="/include/scriptLib.jsp" %>
<script type="text/javascript">
    $(document).ready(function() {
        //绑定排序
        FormUtil.bindOrder();

        //日期时间范围
        laydate.render({
            elem: '#rangeCreateDate'
            ,type: 'datetime'
            ,max: 0
            ,range: true
        });
    });
</script>

</html>